package com.disk.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI().info(new Info().title("个人网盘API").version("1.0")
                .description("后台管理"));
    }
    @Bean
    public GroupedOpenApi folderApi() {
        return GroupedOpenApi.builder().group("folder")
                .pathsToMatch("/folder/**")
                .build();

    }
    @Bean
    public GroupedOpenApi taskApi() {
        return GroupedOpenApi.builder().group("file")
                .pathsToMatch("/file/**")
                .build();
    }
}
